package com.scs.application.modules.sys.dto;

import com.alibaba.fastjson.JSONArray;
import com.scs.application.modules.sys.entity.Printer;
import com.scs.application.modules.wm.entity.Stock;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description:打印RFID实体类
 */
@Data
@Accessors(chain = true)
public class LodoopPrintRFIDDTO {

    /**
     * 打印字符串
     */
    private String sendData;

    /**
     * 打印消息前缀
     */
    private String msgPre;

    /**
     * 打印机
     */
    private Printer printer;

    /**
     * 库存信息
     */
    private Stock stock;

    /**
     * 成功列表
     */
    private JSONArray snArrSuccess;

    /**
     * 打印成功数量
     */
    private int numSuccess;

    //构造函数
    public LodoopPrintRFIDDTO(String sendData, String msgPre, Printer printer, Stock stock) {
        this.sendData = sendData;
        this.msgPre = msgPre;
        this.printer = printer;
        this.stock = stock;
        this.snArrSuccess = new JSONArray();
        this.numSuccess = 0;
    }

    //成功数+1
    public void addNumSuccess() {
        this.numSuccess += 1;
    }

}
